package ship;

import java.awt.Polygon;
import java.util.Hashtable;

public class ShipConstants {
	
	/** Shot constants **/	
	public static final int SHOT_DURATION = 20;
	public static final double CONVERGE = .03;
	public static final double SHOT_DAMAGE = .1;
	public static final double SHOT_VEL = 20;

	
	/** Movement constants **/
	public static final double ANGLE_ACC = .02;
	public static final double MAX_ANGLE_VEL = .2;
	public static final double ACC = .5;
	public static final double MAX_VEL = 10;
	
	public static final double ANGLE_DAMP = .02;
	public static final double DAMP = .1;
	
	/** System constants **/
	public static final String[] systems = { "Engines", "Weapons", "Thrusters", "Shields", "Sensors" };
	public static final int ENGINES = 0;
	public static final int WEAPONS = 1;
	public static final int THRUSTERS = 2;
	public static final int SHIELDS = 3;
	public static final int SENSORS = 4;
	
	/** Specials **/
	
	public static final int JUMP_MIN = 4;
	public static final int SENSOR_RADIUS = 200;
	
	
	/** Model **/
	public static final int RADIUS = 90;
	
	public static final int offset = -10;
	
	public static final int[] frontBodyX = { 0, 10, 10, -10, -10 };
	public static final int[] frontBodyY = {40 + offset, 30 + offset, 20 + offset, 20 + offset, 30 + offset };
	public static final Polygon frontBody = new Polygon(frontBodyX, frontBodyY, frontBodyX.length);
	public static final int FRONT_BODY = 0;
	
	public static final int[] midBodyX = { 10, 10, -10, -10};
	public static final int[] midBodyY = { 20 + offset, 0 + offset, 0 + offset, 20 + offset};
	public static final Polygon midBody = new Polygon(midBodyX, midBodyY, midBodyY.length);
	public static final int MID_BODY = 1;
	
	public static final int[] rearBodyX = { 10, 10, -10, -10};
	public static final int[] rearBodyY = { 0 + offset, -10 + offset, -10 + offset, 0 + offset};
	public static final Polygon rearBody = new Polygon(rearBodyX, rearBodyY, rearBodyX.length);
	public static final int REAR_BODY = 2;
	
	public static final int[] rightCondX = { 10, 20, 20, 10};
	public static final int[] rightCondY = { 10 + offset, 10 + offset, 0 + offset, 0 + offset};
	public static final Polygon rightCond = new Polygon(rightCondX, rightCondY, rightCondX.length);
	public static final int RIGHT_COND = 3;
	
	public static final int[] leftCondX = { -10, -20, -20, -10};
	public static final int[] leftCondY = { 10 + offset, 10 + offset, 0 + offset, 0 + offset};
	public static final Polygon leftCond = new Polygon(leftCondX, leftCondY, leftCondX.length);
	public static final int LEFT_COND = 4;
	
	public static final int[] rightGunX = { 20, 30, 30, 20};
	public static final int[] rightGunY = { 20 + offset, 20 + offset, 10 + offset, 10 + offset};
	public static final Polygon rightGun = new Polygon(rightGunX, rightGunY, rightGunY.length);
	public static final int RIGHT_GUN = 5;
	
	public static final int[] leftGunX = { -20, -30, -30, -20};
	public static final int[] leftGunY = { 20 + offset, 20 + offset, 10 + offset, 10 + offset};
	public static final Polygon leftGun = new Polygon(leftGunX, leftGunY, leftGunX.length);
	public static final int LEFT_GUN = 6;
	
	public static final int[] rightThrusterX = { 20, 30, 30, 20};
	public static final int[] rightThrusterY = { 10 + offset, 10 + offset, -10 + offset, -10 + offset};
	public static final Polygon rightThruster = new Polygon(rightThrusterX, rightThrusterY, rightThrusterY.length);
	public static final int RIGHT_THRUSTER = 7;
	
	public static final int[] leftThrusterX = { -20, -30, -30, -20};
	public static final int[] leftThrusterY = { 10 + offset, 10 + offset, -10 + offset, -10 + offset};
	public static final Polygon leftThruster = new Polygon(leftThrusterX, leftThrusterY, leftThrusterX.length);
	public static final int LEFT_THRUSTER = 8;
	
	public static final Polygon[] model = {frontBody, midBody, rearBody, rightCond, leftCond, rightGun, leftGun, rightThruster, leftThruster };

}
